<!--
    @name 预约工时选择
    @author 丁浩洋
    @time 2021-1-21
 -->
<template>
  <el-dialog>
    <DialogHeader
      slot="title"
      :title="'备件选择'"
    />
    <OneTableTemplate
      :dynamic-components="formInputs"
      :dynamic-buttons="formButtons"
      :dynamic-table-cols="tableHeader"
    />
    <div class="filter-container filter-title">替换件信息</div>
    <OneTableTemplate
      :dynamic-table-cols="tableHeader_1"
      :dynamic-is-show-select="false"
    />
  </el-dialog>
</template>

<script>
import DialogHeader from '@/components/dialogHeader'
import OneTableTemplate from '@/components/templates/oneTable'
import { oneTableWithViewTemplateMixins } from '@/components/mixins/oneTableWithViewTemplateMixins'
export default {
  name: 'AppointmentWorkingHoursSelect',
  components: {
    OneTableTemplate,
    DialogHeader
  },
  mixins: [oneTableWithViewTemplateMixins],
  data() {
    return {
      formInputs: [
        {
          compKey: 'key0',
          labelName: '工时编码',
          codeField: 'isAssign',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true
        },
        {
          compKey: 'key1',
          labelName: '车系：',
          codeField: 'saleOrderCode',
          isMul: false,
          component: () => import('@/components/org/commonInput'),
          type: 'inputText',
          isMust: true
        },
        {
          compKey: 'key2',
          labelName: '车型',
          codeField: 'saleOrderCode',
          lookuptype: 'VE0185',
          component: () => import('@/components/org/LookupValue'),
          type: 'dropdownList',
          isMust: true
        },
        {
          compKey: 'key3',
          labelName: '维修内容',
          codeField: 'isAssign',
          lookuptype: 'VE0185',
          component: () => import('@/components/org/LookupValue'),
          type: 'dropdownList',
          isMust: true
        },
        {
          compKey: 'key4',
          labelName: '工时大类',
          codeField: 'isAssign',
          lookuptype: 'VE0185',
          component: () => import('@/components/org/LookupValue'),
          type: 'dropdownList',
          isMust: true
        }
        // {
        // 	compKey: "key5",
        // 	labelName: "工时小类",
        // 	codeField: "saleOrderCode",
        // 	lookuptype: "VE0185",
        // 	component: () => import("@/components/org/LookupValue"),
        // 	type: "dropdownList",
        // 	isMust: true,
        // }
      ],
      formButtons: [
        {
          compKey: 'btnKey0',
          type: 'primary',
          size: 'small',
          clickEvent: () => this.queryTable(1),
          text: '选择', // 查询
          name: '', // 按钮图标样式
          position: 'right',
          fuzzySearch: true
        },
        {
          compKey: 'btnKey1',
          type: 'primary',
          size: 'small',
          clickEvent: () => this.queryTable(1),
          text: '查询', // 查询
          name: '', // 按钮图标样式
          position: 'right'
        },
        {
          compKey: 'btnKey2',
          type: 'primary',
          size: 'small',
          clickEvent: () => this.queryTable(1),
          text: '重置', // 查询
          name: '', // 按钮图标样式
          position: 'right'
        }
      ],
      tableHeader: [
        // {
        // 	prop: "controlBtn",
        // 	label: "操作", // 操作
        // 	codeField: "orgName",
        // 	width: null,
        // 	align: "center",
        // 	isComponent: true,
        // 	comps: [
        // 		{
        // 			compKey: "propKey1",
        // 			align: "center",
        // 			labelName: "修改",
        // 			codeField: "orgName",
        // 			clickEvent: (index) => {
        // 				this.details(index);
        // 			},
        // 			component: () =>
        // 				import("@/components/org/linkButton"),
        // 		},
        // 	],
        // },
        {
          label: '备件编码',
          prop: ''
        },
        {
          label: '备件名称',
          prop: ''
        },
        {
          label: '单价',
          prop: ''
        },
        {
          label: '库存数量',
          prop: ''
        },
        {
          label: '可用库存',
          prop: ''
        },
        {
          label: '包装含量',
          prop: ''
        },
        {
          label: '备件类别',
          prop: ''
        },
        {
          label: '适用车型',
          prop: ''
        }
      ],
      tableHeader_1: [
        // {
        // 	prop: "controlBtn",
        // 	label: "操作", // 操作
        // 	codeField: "orgName",
        // 	width: null,
        // 	align: "center",
        // 	isComponent: true,
        // 	comps: [
        // 		{
        // 			compKey: "propKey1",
        // 			align: "center",
        // 			labelName: "修改",
        // 			codeField: "orgName",
        // 			clickEvent: (index) => {
        // 				this.details(index);
        // 			},
        // 			component: () =>
        // 				import("@/components/org/linkButton"),
        // 		},
        // 	],
        // },
        {
          label: '备件编码',
          prop: ''
        },
        {
          label: '备件名称',
          prop: ''
        },
        {
          label: '单价',
          prop: ''
        },
        {
          label: '库存数量',
          prop: ''
        },
        {
          label: '可用库存',
          prop: ''
        },
        {
          label: '包装含量',
          prop: ''
        },
        {
          label: '备件类别',
          prop: ''
        }
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
